How to build ships for virtual sailor
The Boat.cfg file The boat.cfg '''file is composed of variable number of lines composed of two elements: Numeric data, String keyword. The numeric data is translated using the string keyword attached to it, and may appear in any order in the file, if certain types of data are not required, they can be omitted from the '''boat.cfg file. These are the allowable keywords and their meanings, most of these parameters are optional, omitting them will make the program used default values. The X files: DirectX geometry files are called X files ( no kidding ... ) , these files are used in Virtual Sailor for modeling the ships and the static objects in the scenery, such as trees and buildings. To create an X file, use any 3D graphic software that can export this format directly or use one that can export 3DS files and convert these files using conv3ds converter written by Microsoft. The most whidely known program to create 3DS files is 3D studio, but others exist which can be also downloaded and evaluated to give you a quick lauch into the fascinating world of 3D object creation. To convert 3DS files to X files use conv3ds converter by Microsoft, it can be download from Download Zone. Any x file used in the program can be encoded 'to keep copyrights of the author, the encoding program is attached inside the main directory of the program, the encoded files have a suffix of '.XX instead of .X The boat is made out of several parts, for each part there is an X file that defines it's geometry, these files are optional and may include the following types: The engine.wav file: The boat has several sound files that accompany it and define it's distictive sounds, all these sounds can be also located inside the boat's directory to make the boat sounds different than the default ones. The texture files: The boat has several texture files that accompany it and define it's color scheme, panel and buttons, these consist of the following files: boat.bmp - this is the file that shows a preview image of the boat. anyname.bmp - this is any texture file that can be used in the x files of the boat, can be also jpg or dds files. The Wav files: The boat has several sound files that accompany it and define it's distictive sounds, all these sounds can be also located inside the boat's directory to make the boat sounds different than the default ones. These wav files should be 8 bit mono files, preferably 11 or 22 khz. The Deck.cfg files: The Deck.cfg file boat defines the outline of the deck and the height of waterline, this file is used to prevent the water in cabin problem by defining a transparent area inside this outline. The file containes the following data: This is a sample deck.cfg file: The Views.cfg and Smokes.cfg files: These files have a simple form of the same structure: number of lines. x, y, z positions of view or smoke. x, y, z positions of view or smoke. x, y, z positions of view or smoke. ... The views.cfg file is defined by the program when moving the camera to desired location on the boat and pressing the add-view button. This same file can be renamed to smokes.cfg and used for smoke origin locations. The panel.cfg file: This file is identical to the standard panels used in the panels directory of the program, and shown when pressing P, this file has the following structure: panel_power panel_name 0.25 panel_scale 0.0 panel_x -0.7 panel_y 1.75 panel_z 0 panel_dx -0.173 panel_dy 0.984 panel_dz 0 panel_ux 0.984 panel_uy 0.173 panel_uz The Pilot#.cfg file There can be up to 12 animated pilots or parts in the boat, these parts or pilots has special functionality given inside the pilot#.cfg where # is a value from 0 to 11, each pilot.cfg file contains a name of animation x file to be loaded into the boat at the given position and orientation. The structure of this file is the following: name of pilot animation x file x_pos - x position of pilot y_pos - y position of pilot z_pos - z position of pilot alfa - direction of pilot fps - animation frame per scond fps_rpm - animation frame per scond depending on motor_rpm loop0 - animation is looping from this frame loop1 - animation is looping until this frame steer0 - the pilot can steer from this frame steer1 - the pilot can steer until this frame throt0 - the pilot can set throttle from this frame throt1 - the pilot can set throttle until this frame sailb0 - the pilot can move main sail from this frame sailb1 - the pilot can move main sail until this frame sails0 - the pilot can move jib sail from this frame sails1 - the pilot can move jib sail until this frame reefb0 - the pilot can reef main sail from this frame reefb1 - the pilot can reef main sail until this frame reefs0 - the pilot can reef jib sail from this frame reefs1 - the pilot can reef jib sail until this frame delay - animation of loop is delayed by this amount in seconds auto_loop - the pilot animation loops while playing auto_hide - the pilot is hidden when too close or too far scale_steer - steering animation is repeated by this scale scale_throt - throttle animation is repeated by this scale scale_sailb - main sail animation is repeated by this scale scale_sails - jib sail animation is repeated by this scale |} |}